﻿/*namespace Skymate.Lyjt.Core
{
    using System;
    using System.Collections.Generic;

    public static class ByteUtil
    {

        /// <summary>
        /// Clones the elements in the specific range.
        /// 
        /// </summary>
        /// <typeparam name="T"/><param name="source">The source.</param><param name="offset">The offset.</param><param name="length">The length.</param>
        /// <returns/>
        public static T[] CloneRange<T>(this List<T> source, int offset, int length)
        {
            T[] objArray1 = source as T[];
            if (objArray1 != null)
            {
                T[] objArray2 = new T[length];
                Array.Copy((Array)objArray1, offset, (Array)objArray2, 0, length);
                return objArray2;
            }
            T[] objArray3 = new T[length];
            for (int index = 0; index < length; ++index)
                objArray3[index] = source[offset + index];
            return objArray3;
        }

    }
}*/